import request from '@/utils/request'
const api_name = '/admin/system/sysDept'

export default{
    //数据展示
    shouList(){
        return request({
            url: `${api_name}/list`,
            method: 'get'
        })
    },

    //新增部门
    addDept(sysDept){
        return request({
            url: `${api_name}/add`,
            method: 'post',
            data:sysDept
        })
    },

    //删除部门
    deleteDept(id){
        return request({
            url: `${api_name}/delete/${id}`,
            method: 'delete'
        })
    },

    //编辑部门
    edit(id){
        return request({
            url: `${api_name}/edit/${id}`,
            method: 'get',
        })
    },

    //修改部门
    updateDept(sysDept){
        return request({
            url: `${api_name}/update`,
            method: 'put',
            data:sysDept
        })
    },
    
}
